package com.mooc.lib_user.arouter.service

import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.mooc.lib_common.CommonApp
import com.mooc.lib_common.arouter.service.UserLoginAService
import com.mooc.lib_common.model.UserEntity

@Route(path = "/lib_user/UserLoginService")
class UserLoginImpl : UserLoginAService {
    lateinit var ctx : Context
//    var userEntity: UserEntity ?= null
    override fun isLogin(): Boolean {
        return CommonApp.userEntity!=null
    }

    override fun getUser(): UserEntity? {
        return CommonApp.userEntity
    }

    override fun init(context: Context?) {
        ctx = context!!
    }
}